<html>
<title>
文字修仙
</title>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="main.css" media="all">
<link rel="stylesheet" href="css/layui.css" tppabs="css/layui.css"  media="all">
<meta name="viewport"  charset="utf-8" content="width=device-width,initial-scale=1.0,user-scalable=0">
<style>
body{
  background-color:black;
  color:white;  
}
#cen{
 padding-top:150px;
}
#login{
width:15%;
hight:40px;
}
</style>
<body>
<center>
<div id="cen">
<h2>登录界面</h2>
<br/>
<br/>
<diV>
<span>账号：</span>
<input type="text" id="usr"/>
<br/>
<br/>
<span>密码：</span>
<input type="password" id="pswd"/>
<br/>
<br/>
<br/>
<br/>
<span>
<button id="login" onclick="login()">登录</button>
</span>
</div>
</div>
</center>
</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="layui.js" charset="utf-8"></script>
 <script>
  var layer = layui.layer;
 function login(){
    var usr = $("#usr").val();
	var pswd = $("#pswd").val();
	if(usr=="admin" && pswd=="123456"){
			layer.alert("登录成功");
			window.location.href="index.html"
	}else{
			layer.alert("账户名或密码错误");
	}
 	
 }
 </script>
</html>